package com.jinxin.platform.cdacscontrolmgr.utils;

/**
 * @Author 那个男人
 * @Date 2022/7/27 9:49
 * @Version 1.0
 */
public class WXShare {

    public static String byteToHex(final byte[] hash) {
        StringBuffer stringBuffer = new StringBuffer();
        for (int i=0; i<hash.length;i++){
            String hexString = Integer.toHexString(hash[i] & 0xFF);
            if (hexString.length() < 2){
                stringBuffer.append(0);
            }
            stringBuffer.append(hexString);
        }

        return stringBuffer.toString();

    }
}
